<%@page language="java" contentType="application/json; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="java.util.*" import="cart.hibernate.releaseCompany.*, cart.hibernate.movieInformation.*" import="cart.*,java.net.*,java.text.*" %>
<%@page import="cart.hibernate.coverImage.*, cart.hibernate.rating.*, cart.hibernate.order.*, cart.hibernate.genre.*, cart.hibernate.actor.*" %> 
<jsp:useBean id="movieInformationManager" scope="request" class="cart.hibernate.movieInformation.ManageMovieInformation" />

[
<%
    List movieInformationList = movieInformationManager.getAllMovie();
    //List orderList = orderManager.getAllOrder();

    Iterator iterMovieInformation = movieInformationList.iterator();
    
    int i = 0;
    while (iterMovieInformation.hasNext())
    {

        MovieInformation movieInformation = (MovieInformation) iterMovieInformation.next();
%>
<% out.print((i == 0) ? "" : ","); %>
{
"id": "<%=movieInformation.getMovieId()%>",
"name": "<%=movieInformation.getMovieName()%>",
"price": "<%=movieInformation.getUnitPrice()%>",
"quantity": "<%=movieInformation.getStockQuantity()%>"
}
<%
        i++;
    }
%>
]
